Wrong ordinal error from DB Maintenance: Analyze Database

Problem

When you run the Analyze Database function of the DB Maintenance utility on an upgraded iMIS database, you receive "Wrong Ordinal" messages on one or more table columns.

Solution

This error is normal on upgraded iMIS databases, and it is harmless and can be safely ignored in most cases. This error can cause problems only if you attempt to bulk load an affected table using BCP and the format files created by ASI. Tables with this reported error will not successfully bulk load unless you first modify the ASI-supplied format file to reflect the actual column order of the affected table instead of the default expected column order specified in the ASI-supplied format files.

Although this error is mostly harmless (except in the case of bulk load operations), you can correct the error by rebuilding the table.

To rebuild a table

Caution! Never run an older version of DB Maintenance against a newer database.

1.  Have all users log out of iMIS.

2.  Schedule downtime for rebuilding tables containing large amounts of data.

3.  Back up all tables that you plan to rebuild.

4.  From the Start menu, select DB Maintenance Utility in the iMIS program group.

5.  Select the table to be rebuilt.

6.  Click Rebuild Table.

To rebuild a customized table

If you have added custom objects (Foreign Key constraints, triggers, indexes) to iMIS tables, you must remove the customizations and then add them back.

1.  Record all custom database objects that you have added to your iMIS tables, because you must manually recreate them.

2.  Manually remove your objects; for example, drop all foreign key constraints on the table (both to and from the table, so you must also check other referencing tables and drop the relevant foreign keys there as well).

3.  Restart DB Maintenance, select the tables, and click Rebuild Table.

4.  Manually recreate all custom foreign key constraints that you recorded.